<?php

class User {

	function __construct(){}

	function userLogin($username, $password) {
		global $db;
		$sql = "SELECT * FROM users WHERE Username='".$username."' AND Password='".$password."'";
		$result = $db->db_query($sql); // db_query executes the T-SQL
		if($result) {
			$row = $db->db_fetchrow($result); // using db_fetchrow (= mysql_fetch_assoc) when having 1 result in T-SQL, db_fetchrowset for many results
			return $row;
		} else return false;
	}
	
}

?>